package persistence;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class Dao {

	Connection con;          //conexao com o banco
	PreparedStatement stmt;  // acesso aos comandos da tabela
	ResultSet rs;            //  consulta
	CallableStatement call;  //stored procedure
	
	//ctrl + shift + o
	
	 public void open() throws Exception{
		 Class.forName("com.mysql.jdbc.Driver");
		 con = DriverManager.
			getConnection("jdbc:mysql://localhost:3306/aula5","root","coti");
	 }
 
	 public void close() throws Exception{
		 con.close();
	 }
	 
}
